package top.xiesen.date;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

/**
 * 测试日历类
 * @author Allen
 *
 */
public class TestCalendar {

	public static void main(String[] args) {
		Calendar c  = new GregorianCalendar();
		c.set(2015, Calendar.FEBRUARY, 3, 12,3, 4);
		Date time = c.getTime();
		System.out.println(time);
		
		System.out.println(c.get(Calendar.YEAR));
		
		//测试日期计算
		c.add(Calendar.YEAR, 30);
		System.out.println(c);
	}
}
